Crate owned_ttf_parser

source ·
Expand description

Extends ttf_parser with owned version of Face: OwnedFace.

Re-exports ttf_parser::*.

Example

use owned_ttf_parser::{AsFaceRef, Face, OwnedFace};

let owned_face = OwnedFace::from_vec(owned_font_data, 0).unwrap();
let face_ref: &Face<'_> = owned_face.as_face_ref();

assert_eq!(face_ref.ascender(), 2254);

Modules

An Anchor Point Table implementation.
This module contains Apple Advanced Typography Layout supplementary tables implementation.
An Axis Variations Table implementation.
A Color Bitmap Data Table implementation.
A Feature Name Table implementation.
A Font Variations Table implementation.
A Glyph Definition Table implementation.
A Glyph Data Table implementation.
A Glyph Positioning Table implementation.
A Glyph Variations Table implementation.
A Font Header Table implementation.
A Horizontal Header Table implementation.
A Kerning Table implementation.
An Extended Kerning Table implementation.
An Index to Location Table implementation.
A Math Table implementation.
A Maximum Profile Table implementation.
A Naming Table implementation.
A list of name ID’s.
This module contains OpenType Layout supplementary tables implementation.
A PostScript Table implementation.
An SVG Table implementation.
A Tracking Table implementation.
A Vertical Header Table implementation.
A Vertical Origin Table implementation.

Structs

A font face.
Parsed face tables.
A 32-bit signed fixed-point number (16.16).
A type-safe wrapper for glyph ID.
A slice-like container that converts internal binary data only on access.
A slice-like container that converts internal binary data only on access.
An iterator over LazyArray16.
An iterator over LazyArray32.
A line metrics.
A variation coordinate in a normalized coordinate system.
An owned version of font Face.
A Face with cmap & kern subtables parsed once on initialization.
A glyph’s raster image.
A raw font face.
A list of all supported tables as raw data.
A rectangle.
A script metrics used by subscript and superscript.
A raw table record.
A 4-byte tag.
A font variation value.

Enums

A list of errors that can occur during a CFF glyph outlining.
A list of font face parsing errors.
A [Name] language.
A glyph raster image format.
A face style.
A face weight.
A face width.

Traits

Used to perform a cheap conversion to a Face reference.
Trait exposing mutable operations on a ttf_parser::Face.
A trait for parsing raw binary data of fixed size.
A trait for glyph outline construction.

Functions

Returns the number of fonts stored in a TrueType font collection.